<?php
// +----------------------------------------------------------------------
// | snake
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 http://baiyf.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: NickBai <1902822973@qq.com>
// +----------------------------------------------------------------------
namespace app\admin\model;

use think\Model; 
class AdModel extends Model
{



    // 确定链接表名
    protected $table = 'snake_ad';
    public function add($param){
    	 $result =  $this->save($param);
            if(false === $result){
                // 验证失败 insert($data))输出错误信息
               return msg(1, url('user/index'), '添加失败');
            }else{

                return msg(1, url('user/index'), '添加用户成功');
            }
    }
     public function info(){
         $result =  $this->select();
            return $result;
    }
}